package com.cbh.binlog.entity;

import lombok.Data;

/**
 * 列解析 反转实体
 *
 * @author ChenBiHui
 * @date 2025/1/16
 */
@Data
public class Column {

    /**
     * 列名
     */
    private String name;

    /**
     * 列类型
     */
    private String type;

    /**
     * 列顺位
     */
    private Integer position;

    /**
     * 旧值(删除/更新前)
     * <br/>
     * tips: 若开启优化选项
     * <br/>
     * datetime/datetime_v2/timestamp/timestamp_v2/date/time/time_v2 优化为返回long
     * <br/>
     * char/varchar/binary/varbinary 优化为返回byte[]
     */
    private Object beforeValue;

    /**
     * 新值(插入/更新后)
     * <br/>
     * tips: 若开启优化选项
     * <br/>
     * datetime/datetime_v2/timestamp/timestamp_v2/date/time/time_v2 优化为返回long
     * <br/>
     * char/varchar/binary/varbinary 优化为返回byte[]
     */
    private Object afterValue;
}
